\hypertarget{classduye_1_1_epoll}{\section{duye\-:\-:Epoll Class Reference}
\label{classduye_1_1_epoll}\index{duye\-::\-Epoll@{duye\-::\-Epoll}}
}


epoll socket server  




{\ttfamily \#include $<$duye\-\_\-epoll.\-h$>$}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classduye_1_1_epoll_a4c896687ad77090733ebf30009eb9cf8}{typedef struct epoll\-\_\-event {\bfseries Sys\-Event}}\label{classduye_1_1_epoll_a4c896687ad77090733ebf30009eb9cf8}

\item 
\hypertarget{classduye_1_1_epoll_ae1fb19807a0a54b229e9ff2524b5939c}{typedef std\-::list$<$ \hyperlink{classduye_1_1_epoll_event}{Epoll\-Event} $>$ {\bfseries Event\-List}}\label{classduye_1_1_epoll_ae1fb19807a0a54b229e9ff2524b5939c}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{classduye_1_1_epoll_a4b8ca6e779fc4988d508742863d626e2}{open} (const uint32 max\-Events=1024)
\begin{DoxyCompactList}\small\item\em open epoll \end{DoxyCompactList}\item 
bool \hyperlink{classduye_1_1_epoll_a0f02d1fbfee8d712fea2f43f0fe04184}{close} ()
\begin{DoxyCompactList}\small\item\em close epoll \end{DoxyCompactList}\item 
bool \hyperlink{classduye_1_1_epoll_a41da624c5b791bbe67f64e34ad96d5ae}{addfd} (const int32 fd, const uint32 epoll\-Mode=E\-P\-O\-L\-L\-I\-N$|$E\-P\-O\-L\-L\-O\-U\-T)
\begin{DoxyCompactList}\small\item\em add fd \end{DoxyCompactList}\item 
bool \hyperlink{classduye_1_1_epoll_a2d154dbb3e79e222408ae6e1a05ab79b}{modfd} (const int32 fd, const uint32 epoll\-Mode=E\-P\-O\-L\-L\-I\-N$|$E\-P\-O\-L\-L\-O\-U\-T)
\begin{DoxyCompactList}\small\item\em modify fd \end{DoxyCompactList}\item 
bool \hyperlink{classduye_1_1_epoll_ad109dc93e823aaa4a3f025cd6874b68c}{delfd} (const int32 fd)
\begin{DoxyCompactList}\small\item\em delete fd \end{DoxyCompactList}\item 
bool \hyperlink{classduye_1_1_epoll_ad0773ecc110175ee707dc3343a4cd1c2}{wait} (Epoll\-::\-Event\-List \&event\-List, const uint32 timeout=-\/1)
\begin{DoxyCompactList}\small\item\em wait event \end{DoxyCompactList}\item 
uint8 $\ast$ \hyperlink{classduye_1_1_epoll_a07f3461bc32c3bcaec62e9d643c2812f}{error} ()
\begin{DoxyCompactList}\small\item\em get last error string \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
epoll socket server 

\subsection{Member Function Documentation}
\hypertarget{classduye_1_1_epoll_a41da624c5b791bbe67f64e34ad96d5ae}{\index{duye\-::\-Epoll@{duye\-::\-Epoll}!addfd@{addfd}}
\index{addfd@{addfd}!duye::Epoll@{duye\-::\-Epoll}}
\subsubsection[{addfd}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-Epoll\-::addfd (
\begin{DoxyParamCaption}
\item[{const int32}]{fd, }
\item[{const uint32}]{epoll\-Mode = {\ttfamily EPOLLIN$|$EPOLLOUT}}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_epoll_a41da624c5b791bbe67f64e34ad96d5ae}


add fd 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em fd} & \-: fd \\
\hline
\mbox{\tt in}  & {\em epoll\-Mode} & \-: epoll events(E\-P\-O\-L\-L\-I\-N, E\-P\-O\-L\-L\-O\-U\-T, E\-P\-O\-L\-L\-P\-R\-I, E\-P\-O\-L\-L\-E\-R\-R, E\-P\-O\-L\-L\-H\-U\-P, E\-P\-O\-L\-L\-E\-T, E\-P\-O\-L\-L\-O\-N\-E\-S\-H\-O\-T), default is E\-P\-O\-L\-L\-I\-N $|$ E\-P\-O\-L\-L\-O\-U\-T \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\hypertarget{classduye_1_1_epoll_a0f02d1fbfee8d712fea2f43f0fe04184}{\index{duye\-::\-Epoll@{duye\-::\-Epoll}!close@{close}}
\index{close@{close}!duye::Epoll@{duye\-::\-Epoll}}
\subsubsection[{close}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-Epoll\-::close (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_epoll_a0f02d1fbfee8d712fea2f43f0fe04184}


close epoll 

\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\hypertarget{classduye_1_1_epoll_ad109dc93e823aaa4a3f025cd6874b68c}{\index{duye\-::\-Epoll@{duye\-::\-Epoll}!delfd@{delfd}}
\index{delfd@{delfd}!duye::Epoll@{duye\-::\-Epoll}}
\subsubsection[{delfd}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-Epoll\-::delfd (
\begin{DoxyParamCaption}
\item[{const int32}]{fd}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_epoll_ad109dc93e823aaa4a3f025cd6874b68c}


delete fd 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em fd} & \-: fd \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\hypertarget{classduye_1_1_epoll_a07f3461bc32c3bcaec62e9d643c2812f}{\index{duye\-::\-Epoll@{duye\-::\-Epoll}!error@{error}}
\index{error@{error}!duye::Epoll@{duye\-::\-Epoll}}
\subsubsection[{error}]{\setlength{\rightskip}{0pt plus 5cm}uint8$\ast$ duye\-::\-Epoll\-::error (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_epoll_a07f3461bc32c3bcaec62e9d643c2812f}


get last error string 

\begin{DoxyReturn}{Returns}
error string 
\end{DoxyReturn}
\begin{DoxyNote}{Note}

\end{DoxyNote}
\hypertarget{classduye_1_1_epoll_a2d154dbb3e79e222408ae6e1a05ab79b}{\index{duye\-::\-Epoll@{duye\-::\-Epoll}!modfd@{modfd}}
\index{modfd@{modfd}!duye::Epoll@{duye\-::\-Epoll}}
\subsubsection[{modfd}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-Epoll\-::modfd (
\begin{DoxyParamCaption}
\item[{const int32}]{fd, }
\item[{const uint32}]{epoll\-Mode = {\ttfamily EPOLLIN$|$EPOLLOUT}}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_epoll_a2d154dbb3e79e222408ae6e1a05ab79b}


modify fd 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em fd} & \-: fd \\
\hline
\mbox{\tt in}  & {\em epoll\-Mode} & \-: epoll events(E\-P\-O\-L\-L\-I\-N, E\-P\-O\-L\-L\-O\-U\-T, E\-P\-O\-L\-L\-P\-R\-I, E\-P\-O\-L\-L\-E\-R\-R, E\-P\-O\-L\-L\-H\-U\-P, E\-P\-O\-L\-L\-E\-T, E\-P\-O\-L\-L\-O\-N\-E\-S\-H\-O\-T), default is E\-P\-O\-L\-L\-I\-N $|$ E\-P\-O\-L\-L\-O\-U\-T \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\hypertarget{classduye_1_1_epoll_a4b8ca6e779fc4988d508742863d626e2}{\index{duye\-::\-Epoll@{duye\-::\-Epoll}!open@{open}}
\index{open@{open}!duye::Epoll@{duye\-::\-Epoll}}
\subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-Epoll\-::open (
\begin{DoxyParamCaption}
\item[{const uint32}]{max\-Events = {\ttfamily 1024}}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_epoll_a4b8ca6e779fc4988d508742863d626e2}


open epoll 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em max\-Event} & \-: the number of the max events \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}
\hypertarget{classduye_1_1_epoll_ad0773ecc110175ee707dc3343a4cd1c2}{\index{duye\-::\-Epoll@{duye\-::\-Epoll}!wait@{wait}}
\index{wait@{wait}!duye::Epoll@{duye\-::\-Epoll}}
\subsubsection[{wait}]{\setlength{\rightskip}{0pt plus 5cm}bool duye\-::\-Epoll\-::wait (
\begin{DoxyParamCaption}
\item[{Epoll\-::\-Event\-List \&}]{event\-List, }
\item[{const uint32}]{timeout = {\ttfamily -\/1}}
\end{DoxyParamCaption}
)}}\label{classduye_1_1_epoll_ad0773ecc110175ee707dc3343a4cd1c2}


wait event 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt out}  & {\em event\-List} & \-: return event \\
\hline
\mbox{\tt in}  & {\em timeout} & \-: wait time out, default is -\/1, indicate block, millisecond \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true/false 
\end{DoxyReturn}


The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Z\-:/duye/src/duyebase/system/\hyperlink{duye__epoll_8h}{duye\-\_\-epoll.\-h}\end{DoxyCompactItemize}
